<?php
class WikiAction extends Action {
	public function create() {
		$this->displayIt('create');
	}

	public function edit() {
		$this->displayIt('edit');
	}

	public function displayIt($type) {
		$res = ($type == 'create') ? 
			D('Wiki','wiki')->getUserCreateWikiByPage($this->mid, 'id DESC', 40) : 
			D('Wiki','wiki')->getUserEditWikiByPage($this->mid, 'id DESC', 40);
		$this->assign($res);
		$this->assign('type', $type);
		$this->display('index');
	}
}
?>